{% assign score_uncheck_color = theme_config.global.product_score_uncheck_color | default:'#bbbbbb' %}
{% assign score_selected_color = theme_config.global.product_score_selected_color | default:'#F8AD6B' %}

{%- assign sinppets_comment_total_count = comment_total_count | default: product.comment_total_count -%}
{%- unless theme_config.global.product_is_score == false -%}
{% if score > 0 %}
  {% assign width = score | default:0 | divided_by: 5 | times:100 %}
  <div class="moi-start-warp {{class}} {% if storeConfig.comments_status == '1' %}moi-start-warp-underline{% endif %}" style="{{style}}">
    <div class="comment-star-warp">
      <div class="comment-star-base">
        {% for index in (1..5) %}
          {% include "icon_block_star" , width:"20",height:"20",color: score_uncheck_color %}
        {% endfor %}
      </div>

      <div class="comment-star-base comment-star-warp-choose" style="width:{{width}}%">
        {% for index in (1..5) %}
          {% include "icon_block_star" , width:"20",height:"20",color: score_selected_color %}
        {% endfor %}
      </div>
    </div>
    {% if theme_config.global.product_is_score_number == 1 %}
      <span>(<span>{{ score }}</span>)</span>
    {% elsif theme_config.global.product_is_score_number == 2 and sinppets_comment_total_count != 0 %}
      <span>(<span>{{ sinppets_comment_total_count }}</span>)</span>
    {% else %}
      <span>{{ score }}</span><span>(<span>{{ sinppets_comment_total_count }}</span>)</span>
    {% endif %}
  </div>
{% endif %}
{%- endunless -%}

